package com.dayaokeji.rhythmschoolstudent.client.common.exam.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter

/**
 *********************************************************************
 **  Created by Zeno on 2018/7/25
 *********************************************************************
 **  version 1.0
 *********************************************************************
 **  Copyright (C) dayaokeji.com 2018 -- 2020 All rights reserved.
 *********************************************************************
 **
 *********************************************************************
 */
class SubjectResultViewPagerAdapter(val fragmentManager: FragmentManager,val fragments: List<Fragment>) : FragmentPagerAdapter(fragmentManager) {

    companion object {
        private val titles: Array<String> = arrayOf("原题","答案")
    }

    override fun getItem(position: Int): Fragment {
        return fragments[position]
    }

    override fun getCount(): Int {
        return fragments.size
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return titles[position]
    }
}